#!/usr/bin/perl -Ilib -w

use strict;
use Number::Fraction;

my $a = Number::Fraction->new ("2/12");
my $b = Number::Fraction->new (num => 4, den => 2);
my $c = Number::Fraction->new (num => 3, den => 4);
my $d = Number::Fraction->new (num => 9, den => 12);
my $e = Number::Fraction->new (num => 3, den => 5);
my $f = Number::Fraction->new (num => 7, den => 5);
my $r1 = $a + $b;
my $r2 = $e - $f;
my $r3 = $a * $c;
my $r4 = $b / $c;
print " Fracciones \n";
print " -> $a \n";
print " -> $b\n";
print " -> $c\n";
print " -> $d\n";
print " -> $e\n";
print " -> $f\n";
print " Operaciones \n";
print " suma  ($a + $b) = $r1 \n";
print " resta ($e - $f) = $r2 \n";
print " Prod  ($a * $c) = $r3 \n";
print " div   ($b / $c) = $r4 \n";
print " Fin \n";

